﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Linq;
using System.Text;
using System.Drawing;
using Hybrid;

namespace Hybrid
{
    class Enemy
    {
        private Sprite privateSpriteObject;
        private List<Image> privateProjectileImage;
        private List<Projectile> privateProjectiles = new List<Projectile>();

        public Enemy(List<Image> SpriteImage, List<Image> projectileImage, int speed)
        {

            Random ran = new Random();
            privateSpriteObject = new Sprite(SpriteImage, ran.Next(0, 730 - SpriteImage[0].Width), 0, 0, speed, false, true);
            privateProjectileImage = projectileImage;
        }

        public Sprite Object
        {
            get
            {
                return privateSpriteObject;
            }
        }

        public void FireProjectile()
        {
            privateProjectiles.Add(new Projectile(privateProjectileImage, privateSpriteObject.X + (privateSpriteObject.Width / 2), privateSpriteObject.Y, 20));
        }

        public List<Projectile> Projectiles
        {
            get
            {
                return privateProjectiles;
            }
        }

    }
}
